package cls;

import java.util.*;

public class MapClientes {
  static Map<String,Cliente> clientes;

  static {
    clientes = new HashMap<String,Cliente>();
    agregarCliente(new Cliente("id001", "Juan", -2500.25));
    agregarCliente(new Cliente("id002", "Luis", 1234.32));
    agregarCliente(new Cliente("id003", "Ana", 950303.28));
  }

  public static Cliente obtener(String id) {
    if (id!=null) {
      return(clientes.get(id.toLowerCase()));
    } else {
      return(null);
    }
  }

  static void agregarCliente(Cliente cliente) {
    clientes.put(cliente.getId(), cliente);
  }
}
